Skip to content

Change tests.sh for portability#55

Merged
chaudum merged 1 commit intochaudum:mainfrom
slycordinator:shell_script_mod
Mar 28, 2026
Merged

Change tests.sh for portability#55
chaudum merged 1 commit intochaudum:mainfrom
slycordinator:shell_script_mod

Conversation

@slycordinator
Copy link
Copy Markdown
Contributor

  1. Changed to use /bin/sh instead of /bin/bash

Everything in the script is already posix compliant.

  1. Change to use find -exec rm -rf {} + instead of find | xargs rm -rf

This avoids the edge case of when one of the paths to the subdirectories have spaces or other unusual characters.

An alternative fix for that is to use "find . -name pycache -type d -print0 | xargs -0 rm -rf", but this is a less portable option

1) Changed to use /bin/sh instead of /bin/bash

Everything in the script is already posix compliant.

2) Change to use find -exec rm -rf {} +  instead of find | xargs rm -rf

This avoids the edge case of when one of the paths to the subdirectories have spaces or other unusual characters.

An alternative fix for that is to use "find . -name __pycache__ -type d -print0 | xargs -0 rm -rf", but this is a less portable option
Copy link
Copy Markdown
Owner

@chaudum chaudum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@chaudum chaudum merged commit d03e63a into chaudum:main Mar 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants